package rc.work.module.bpm.service.problem.listener;

import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
import rc.work.module.bpm.api.event.BpmProcessInstanceStatusEvent;
import rc.work.module.bpm.api.event.BpmProcessInstanceStatusEventListener;
import rc.work.module.bpm.enums.task.BpmTaskStatusEnum;
import rc.work.module.bpm.service.oa.BpmOALeaveService;
import rc.work.module.bpm.service.oa.BpmOALeaveServiceImpl;
import rc.work.module.bpm.service.problem.ProblemService;
import rc.work.module.bpm.service.problem.ProblemServiceImpl;

@Component
public class ProblemListener extends BpmProcessInstanceStatusEventListener {

    @Resource
    private ProblemService problemService;

    @Override
    protected String getProcessDefinitionKey() {
        return ProblemServiceImpl.PROCESS_KEY;
    }

    @Override
    protected void onEvent(BpmProcessInstanceStatusEvent event) {
        Integer status = event.getStatus();
        String businessKey = event.getBusinessKey();
        if(BpmTaskStatusEnum.APPROVE.getStatus().equals(status)){
        }

        if(BpmTaskStatusEnum.REJECT.getStatus().equals(status)){

        }
        if (BpmTaskStatusEnum.CANCEL.getStatus().equals(status)) {

        }
        if (BpmTaskStatusEnum.RETURN.getStatus().equals(status)) {

        }
    }

}
